#include <stdio.h>
char week_day[][10]={"sunday","monday","tuesday","wednesday","thursday","friday","saturday"};
main()
{	    	   
    int i,j;
    char id[10],c;
    printf("Enter a string:");
    scanf("%s",id);
    for(i=0;i<7;i++)
    {	    	   
        for(j=0;(c=week_day[i][j])==id[j]&&c!='\0';j++)
            ;
        if(c=='\0')
            break;
    }
    if(i<7)
        printf("%s is %d\n",id,i);
    else
        printf("Error\n");
}